package java_io;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import static java.lang.System.out;

public class ReadFile {

	public static void main(String[] args) {
		
		final String dir = System.getProperty("user.dir");
		final String path = dir + "\\bin\\javacore\\io\\contacts.csv";
		
		try (InputStream in = new FileInputStream(new File(path))){
		
			int b;
			while ((b = in.read()) != -1) {
				out.print((char) b);
			}
			
		}catch(FileNotFoundException e){
			out.println("File not found: " + e.toString());
		}catch(IOException e){
			out.println(e.toString());
		}

	}

}
